<template>
    <div class="app">
        <van-tabs  @click="togetBossDetail" @rendered="togetBossDetail">
            <van-tab v-for="item in bossList" :key="item.id" :title="item.name"></van-tab>
        </van-tabs>
        <van-tabs @click="onchange">
            <van-tab title="汇总">
                 <van-cell title="时间" value="内容" size="large" label="描述信息" />
                <van-cell title="时间" value="内容" size="large" label="描述信息" />
            </van-tab>
            <van-tab title="来网">
                <come-box ></come-box>
            </van-tab>
            <van-tab title="走网">
                <out-box></out-box>
            </van-tab>
            <van-tab title="付款">
                <price-box></price-box>
            </van-tab>
        </van-tabs>
       

        <net-bottom></net-bottom>
    </div>
</template>

<script>
import netBottom from "./components/netBottom.vue"
import comeBox from "./components/comeBox.vue"
import outBox from "./components/outBox.vue"
import priceBox from "./components/priceBox.vue"

import { getBoss, getBossDetail } from "@/http/api.js"


export default {
    data(){
        return {
            bossList:[]
        }
    },
    components:{
        netBottom,
        comeBox,
        outBox,
        priceBox,
    },
    mounted() {
        // 获取老板列表
        this.togetBoss()
        
    },
    methods: {


        // 点击进入详情
        toDetail(){

        },


        // 接口

        // 获取老板列表
        async togetBoss(){
            let res  = await getBoss()
            this.bossList = res.data.data
        },

        // 获取老板详细数据
        async togetBossDetail(index){
            let res  = await getBossDetail(this.bossList[index].id)
            // this.bossList = res.data.data
        },
        
    },
}
</script>

<style scoped lang="less">
.app{
    font-family: "微软雅黑";
    color: black;
}

.red{
    background-color: red;
}
.blue{
    background-color: blue;
}



</style>